<?php


namespace app\home\controller;


class Goods extends \think\Controller
{
    public function goodsList(){
        $data = db('goods')->where('goods_status',1)->where('goods_number','>',0)->select();
        $this->assign('data',$data);
        return $this->fetch('goodsList');
    }
    
 public function detail(){
      $goods_id = input('param.goods_id');
      if($goods_id){
      $data = db('goods')->where('goods_id',$goods_id)->find();
      $this->assign('data',$data);
      }
      return $this->fetch('detail');
    }   
    
    
    
    
    
    
    
    
    
    
    
    
}
